package com.anlu.pattern.structrue.proxy.staticproxy;

/**
 * <p>
 * Description: 静态代理的中间类
 * <p>
 * <p>
 *
 * @author anlu
 * @date 2022/5/5 14:54
 */
public class RenterProxy implements HouseService {
    private HouseService renter;


    public RenterProxy(HouseService renter) {
        this.renter = renter;
    }

    @Override
    public void rentHouse() {
        System.out.println("中介找房东租房，转租给租客");
        renter.rentHouse();
        System.out.println("中介给租客钥匙，租客入住");
    }
}
